//
//  ProgressBar.m
//  blocklyios
//
//  Created by steward on 2018/12/28.
//  Copyright © 2018 szltech. All rights reserved.
//

#import "ProgressBar.h"
#import "Masonry.h"

@implementation ProgressBar

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    return self;
}
- (instancetype)initWithCoder:(NSCoder *)coder {
    self = [super initWithCoder:coder];
    if (self) {
        [self initView];
    }
    return self;
}

- (void)initView {
    //初始化view
    self.contentView = [[[NSBundle mainBundle] loadNibNamed:@"ProgressBar" owner:self options:nil] firstObject];
    //添加view
    [self addSubview:self.contentView];
    //添加约束
    @weakify(self);
    [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self);
        make.top.equalTo(self.mas_top);
        make.bottom.equalTo(self.mas_bottom);
        make.left.equalTo(self.mas_left);
        make.right.equalTo(self.mas_right);
    }];
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

@end
